package com.woniuxy02;


import java.util.Arrays;
import java.util.Scanner;

public class Test06 {

    public static void main(String[] args) {
        System.out.println("abcdefgcdexxcdexx".indexOf("cde"));
        System.out.println("abcdefg".indexOf("cdx"));
        System.out.println("abcdefg".indexOf('d'));
        System.out.println("abcdefg".indexOf(98));
        System.out.println("abcdeabcdeabcde".indexOf('a'));
        System.out.println("abcdeabcdeabcde".indexOf('a',1));

        System.out.println("abcdefg".substring(2));
        System.out.println("abcdefg".substring(2,5));
        String str="abcdefg";
        System.out.println(str.substring(2,str.length()));

        System.out.println(Arrays.toString("abcd".getBytes()));
        System.out.println(Arrays.toString("abcd中文".getBytes()));
        char[] chars = "abcd".toCharArray();
        System.out.println(Arrays.toString(chars));

    }
}
